doctype html
html
    head
        meta(charset="utf-8")
        meta(meta http-equiv="X-UA-Compatible" content="IE=edge")
        meta(meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport")
        title #{article.title}
        link(rel="stylesheet" href="../css/public.css")
        link( rel="stylesheet" href="../css/article.css")
        link( rel="stylesheet" href="../css/mavonEditor.css")
    body
        include ../includes/nav.jade
        div.content.fixclear
            div.article
                h1 #{article.title}
                div.a-tags-list
                    each t in article.tags
                        span.a-tag #{t}
                div.a-msg 更新时间&nbsp;:&nbsp;#{article.meta.updateAt.toLocaleString().replace('T', ' ').slice(0, -5)}
                    span.a-read 阅读&nbsp;:&nbsp;#{article.read}
                    span.a-comments 评论&nbsp;:&nbsp;#{article.comments.length}
                div.a-content.markdown-body !{article.content}
                div.end --完
                div.comment
                    textarea(rows="3" id="comment") 留言
                    div.comment-tip(id="comment-tip") 请15秒后再留言
                    button(id="submitComment" data-id="#{article._id}") 确定
                    div.comments-list
                        h3 #{article.comments.length}条留言
                        each c,index  in article.comments
                            div.comment-item #{index + 1}楼&nbsp;&nbsp;#{c.time.toLocaleString()}
                                p !{c.content}
            aside
                div.related-articles
                div.ra-title 相关文章
                div.ras-list
                    ul
                        if article.related_articles.length>0
                            each ra in article.related_articles
                                li
                                    a(href="/article/#{ra._id}") #{ra.title}
                        else
                            </br>暂时没有
        include ../includes/footer
        script(type="text/javascript" src="../js/utility.js")
        script(type="text/javascript" src="../js/pubilc.js")
        script(type="text/javascript" src="../js/article.js")